package org.gdtc.storefront.service.impl;

import org.gdtc.storefront.entity.Saleafter;
import org.gdtc.storefront.mapper.SaleafterMapper;
import org.gdtc.storefront.service.SaleafterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class SaleafterServiceImpl implements SaleafterService {
    @Autowired
    private SaleafterMapper saleafterMapper;
    @Override
    public int deleteByPrimaryKey(Integer id) {
        return saleafterMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Saleafter record) {
        return saleafterMapper.insert(record);
    }

    @Override
    public Saleafter selectByPrimaryKey(Integer id) {
        return saleafterMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Saleafter> selectAll() {
        return saleafterMapper.selectAll();
    }

    @Override
    public int updateByPrimaryKey(Saleafter record) {
        return saleafterMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Saleafter> QueryAllSalea(Integer storeid) {
        return saleafterMapper.QueryAllSalea(storeid);
    }

    @Override
    public int UpdSaleaState(Integer id, Integer storeid,Integer state) {
        return saleafterMapper.UpdSaleaState(id,storeid,state);
    }

    @Override
    public List<Saleafter> SelectUpdSalea(Integer storeid,Integer id) {
        return saleafterMapper.SelectUpdSalea(storeid,id);
    }

    @Override
    public int QuerycommodityId(Integer id) {
        return saleafterMapper.QuerycommodityId(id);
    }

    @Override
    public List<Saleafter> QuerySaleaWhere(Integer storeid, Integer state) {
        return saleafterMapper.QuerySaleaWhere(storeid, state);
    }
}
